%% Author: kevin.jingqiu
%% Created: May 29, 2009
%% Description: TODO: Add description to p7
-module(p7).

%%
%% Include files
%%

%%
%% Exported Functions
%%
-export([solve/0]).

%%
%% API Functions
%%
solve() -> p7(1, 10001, 2).




%%
%% Local Functions
%%
p7(Start, Num, Current) when Start < Num ->
	NewCurrent = Current + 1,
	case mylib:is_prime(NewCurrent) of
		true ->
			p7(Start+1, Num, NewCurrent);
		false ->
			p7(Start, Num, NewCurrent)
	end;
p7(Num, Num, Current) -> Current.


